import os
import subprocess
from conf import conf

def work():
    base_dir = os.path.dirname(os.path.abspath(__file__)) + "/../../"
    path = base_dir + "data/server/"
    cmd_exe = base_dir+"bin/oprf.exe"
    config = conf.read_json()
    key = config['select_key']
    bins = str(config['bucket_num'])
    result = subprocess.run([cmd_exe,
                             bins,key,
                             path+"position.bin",path+"q.bin",
                             path+"b.bin",path])

if __name__ == '__main__':
    work()